home *** CD-ROM | disk | FTP | other *** search
- Path: news.rain.org!usenet
- From: "Guus Leeuw jr." <guusl@eiffel.com>
- Newsgroups: comp.lang.c
- Subject: Re: Towers of Hanoi
- Date: Tue, 05 Mar 1996 10:33:35 -0800
- Organization: Interactive Software Engineering Inc. http://www.eiffel.com/
- Message-ID: <313C88FF.5891C36B@eiffel.com>
- References: <4h5gq7$bmo@useneta1.news.prodigy.com>
- NNTP-Posting-Host: @outback.eiffel.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; Linux 1.2.8 i586)
-
- Craig Bellet wrote:
- >
- > Learning to program in C++. Assigned problem of moving four progressively
- > larger rings sitting on a peg to another peg one ring at a time. The
- > object is to move the stack of rings to another peg. A small ring may be
- > placed upon a larger ring or an empty peg but not upon a larger ring.
-
- What ??? You do a) or b) but a) ??? How is that to work ???
-
- > A third peg is to facilitate this by temporarily holding rings. The
- > solution involves recursion but I am unable to figure out the algorithm.
- > Any thoughts?
-
- I can't see any algorithm for this particular problem either.
-
- If it would have been posted correctly, you won't get any answer here for two
- sophicticated reasons:
- a) it's about C++, this group is about C
- b) it's an assignment, youo have to your homework yourself, as we did that
- too.
-
- Guus
-